package com.lk.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@RequestMapping("/")
@Controller
public class PageController {
    //http:/localhost/doIndexUI
    @RequestMapping("doIndexUI")
    public String doIndexUI(){
        return "starter";
    }

    @RequestMapping("doPageUI")
    public String doPageUI(){
        return "common/page";
    }
    @RequestMapping("doLoginUI")
    public String doLoginUI(){
        return "login";
    }

    //@RequestMapping("log/log_list")
    //public String doLogUI(){
    //    return "sys/log_list";
    //}
    //
    //@RequestMapping("menu/menu_lists")
    //public String doMenuUI(){
    //    return "sys/menu_list";
    //}

    /**
     * REST风格的URL映射，简化URL路径
     * URL路径中的数据通过@PathVariable在形式参数中获取，传递下去
     * @author Lukang
     * @date 2021/11/3 下午8:46
     * @param module
     * @param moduleUI
     * @return java.lang.String
     */
    @RequestMapping("{module}/{moduleUI}")
    public String doModuleUI(@PathVariable String module, @PathVariable String moduleUI) {
        return "sys/" + moduleUI;
    }


}
